package com.iplay.dahua.chapter2.decorator;

/**
 * @author dangwu
 * @since 2021/7/27 1:00 下午
 */
public abstract class Decorator extends Component {

    private Component component;

    public void setComponent(Component component) {
        this.component = component;
    }

    @Override
    public void operation() {
        if (component != null) {
            component.operation();
        }

    }
}
